import { lazy } from "react";
import { createBrowserRouter } from "react-router-dom";
const Home = lazy(() => import("../pages/Home/Home"));
const Detail = lazy(() => import("../pages/Detail/Detail"));
const Error = lazy(() => import("../pages/404/Error"));
const router = createBrowserRouter([
  {
    path: "/",
    element: <Home></Home>,
  },
  {
    path: "/Detail",
    element: <Detail></Detail>,
  },
  {
    path: "*",
    element: <Error></Error>,
  },
]);
export default router;
